package com.hrd.common.util.enums;

import lombok.Getter;

/**
 * 核算类型枚举
 */
@Getter
public enum AssistTypeEnum {

    BD_CUSTOMER("bd_customer","客户"),
    BD_SUPPLIER("bd_supplier","供应商"),
    BD_MATERIAL("bd_material","商品"),
    BD_DEPARTMENT("bd_department","部门"),
    BD_AUXINFO("bd_auxinfo","辅助资料"),
    BD_EMPLOYEE("bd_employee","职员"),
    BD_STORE("bd_store","仓库");

    AssistTypeEnum(String type, String desciption) {
        this.type = type;
        this.desciption = desciption;
    }

    /**
     * 根据类型获取名称
     * @param type
     * @return
     */
    public static String getEnum(String type) {
        for (AssistTypeEnum typeEnum : AssistTypeEnum.values()) {
            if (typeEnum.getType().equals(type)) {

                return typeEnum.getDesciption();
            }
        }
        return null;
    }

    private String type;
    private String desciption;
}
